 #include<stdio.h>
int main(){
    int n, sum, input,count = 3;
    char ch;
    while(count--){
        sum = 0;
        while(1){
            if(scanf("%d", &input) != 1)
                break;
            sum += input;
            if((ch = getchar()) == '\n')
                break;
        }
        printf("%d\n",sum);                       
    }
    return 0;
}